﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.Linq;


namespace FPTPages.BetPage
{
    public partial class LoginPage : System.Web.UI.Page
    {

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {

            LINQDataBaseDataContext db = new LINQDataBaseDataContext();
            int kq = db.Procedure_login(UserName.Text.Trim(), Password.Text.Trim());
            if (kq <= 2)
            {
                HttpContext.Current.Response.Redirect("");
            }
            else
                if (kq > 2)
                {
                    Session["idlogin"] = kq;
                    Response.Redirect("BetPage.aspx");
                }
                else
                {
                    Response.Write("<script>alert('Đăng Nhập Thất Bại');</script>");
                }

        }
    }
}